/*
 * Licensed to Jasig under one or more contributor license
 * agreements. See the NOTICE file distributed with this work
 * for additional information regarding copyright ownership.
 * Jasig licenses this file to you under the Apache License,
 * Version 2.0 (the "License"); you may not use this file
 * except in compliance with the License.  You may obtain a
 * copy of the License at the following location:
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
package com.baijia.commons.authentication;

import java.io.Serializable;
import java.util.Date;
import java.util.Map;

import org.apache.commons.lang.builder.ToStringBuilder;
/**
 * @title Authentication
 * @desc 登录认证信息，成功认证后返回
 * @author caoliang
 * @date 2015年11月18日
 * @version 1.0
 */
public class Authentication implements Serializable {
    
    private static final long serialVersionUID = 7190808313036410788L;
    
    // 登录身份
    private Principal principal;
    // 附加信息
    private Map<String, Object> attributes;
    // 登录时间
    private Date authenticatedDate;
    
    public Principal getPrincipal() {
    
        return principal;
    }
    public void setPrincipal(Principal principal) {
    
        this.principal = principal;
    }
    public Map<String, Object> getAttributes() {
    
        return attributes;
    }
    public void setAttributes(Map<String, Object> attributes) {
    
        this.attributes = attributes;
    }
    public Date getAuthenticatedDate() {
    
        return authenticatedDate;
    }
    public void setAuthenticatedDate(Date authenticatedDate) {
    
        this.authenticatedDate = authenticatedDate;
    }
    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
    
}
